Method and system for fast clipping of line segments

ABSTRACT

A method of static graphics rendering in a mobile device. Panning increments are received for panning a previously rendered frame to a panned frame. A rendering region is then determined based on the panning increments. A candidate line segment or polyline is then clipped to create clipped line segments contained within the rendering region. The clipped line segments can then be rendered, and a portion of the previously rendered frame can be copied, to provide the panned frame.

TECHNICAL FIELD

The present application relates graphics rendering. In particular, thepresent application relates to a method and system for fast clipping ofline segments to render static graphic images.

BACKGROUND DISCUSSION

Line clipping methods and algorithms are well known in the field ofcomputer graphics. In computer graphics, clipping refers to anoptimization step where only portions of the vector or raster image thatare visible to the user are drawn. This can save processing time, onparts of the image that do not fall into any visible region of thedisplay. For 2D vector graphics data such as polygons and lines,clipping consists of deciding which of the vector data would becompletely visible or completely invisible or partially visible. For theformer two cases, the system either completely draws or throws away therespective geometry and for the partially visible case the geometry is‘cut’ such that only the visible portion is drawn. For example, a linesegment is intersected with the visible boundary of the display to comeup with a shorter line segment that is completely contained within thebounds of the display. Hence clipping is used to accelerate the timetaken to render graphics to the display.

Well known line clipping methods include the Cohen-Sutherland method, inwhich, for rectangular windows, the four edges of the clip window areextended, and nine regions are created from their intersection, of whichonly the middle region (viewport) is visible. The Cohen-Sutherlandmethod includes, excludes or partially includes lines based on theregions in which the endpoints lie. The Liang-Barsky line clippingmethod is another popular line clipping algorithm. It uses theparametric equation of a line and inequalities describing the range ofthe clipping window to determine the intersections between the line andthe clipping rectangle. While these methods are effective, they stillrequire significant computational resources and time to render each newframe. This is of particular concern in mobile devices where new andmore powerful graphics applications are being deployed, and wherecomputational resources and power usage are at a premium.

It is, therefore, desirable to provide a method and system of clippinglines that is quicker and less computationally intensive than previouslyknown methods.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the present application will now be described, by way ofexample only, with reference to the attached Figures, wherein:

FIG. 1 is a block diagram of an exemplary embodiment of a portableelectronic device;

FIG. 2 is an exemplary block diagram of a communication subsystemcomponent of FIG. 1;

FIG. 3 is a block diagram of an exemplary implementation of a node of awireless network;

FIG. 4 is a block diagram illustrating components of an exemplaryconfiguration of a host system that the portable electronic device cancommunicate with;

FIG. 5 is a flowchart of an exemplary method;

FIG. 6 illustrates a panning operation;

FIG. 7 illustrates rectangular clipping of a polyline;

FIGS. 8-10 illustrate clipping a polyline against an L-shaped region;and

FIG. 11 shows the eight cases into which clipped line segments can fall.

DETAILED DESCRIPTION

It will be appreciated that for simplicity and clarity of illustration,where considered appropriate, reference numerals may be repeated amongthe figures to indicate corresponding or analogous elements. Inaddition, numerous specific details are set forth in order to provide athorough understanding of the embodiments described herein. However, itwill be understood by those of ordinary skill in the art that theembodiments described herein may be practiced without these specificdetails. In other instances, well-known methods, procedures andcomponents have not been described in detail so as not to obscure theembodiments described herein. Also, the description is not to beconsidered as limiting the scope of the embodiments described herein.

The embodiments described herein generally relate to portable electronicdevices. Examples of portable electronic devices include mobile orhandheld wireless communication devices such as pagers, cellular phones,cellular smart-phones, wireless organizers, personal digital assistants,computers, laptops, handheld wireless communication devices, wirelesslyenabled notebook computers and the like.

The portable electronic device may be a two-way communication devicewith advanced data communication capabilities including the capabilityto communicate with other portable electronic devices or computersystems through a network of transceiver stations. The portableelectronic device may also have the capability to allow voicecommunication. Depending on the functionality provided by the portableelectronic device, it may be referred to as a data messaging device, atwo-way pager, a cellular telephone with data messaging capabilities, awireless Internet appliance, or a data communication device (with orwithout telephony capabilities). To aid the reader in understanding thestructure of the portable electronic device and how it communicates withother devices and host systems, reference will now be made to FIGS. 1through 4.

Referring first to FIG. 1, shown therein is a block diagram of anexemplary embodiment of a portable electronic device 100. The portableelectronic device 100 includes a number of components such as a mainprocessor 102 that controls the overall operation of the portableelectronic device 100. Communication functions, including data and voicecommunications, are performed through a communication subsystem 104.Data received by the portable electronic device 100 can be decompressedand decrypted by a decoder 103, operating according to any suitabledecompression techniques (e.g. YK decompression, and other knowntechniques) and encryption techniques (e.g. using an encryptiontechnique such as Data Encryption Standard (DES), Triple DES, orAdvanced Encryption Standard (AES)). The communication subsystem 104receives messages from and sends messages to a wireless network 200. Inthis exemplary embodiment of the portable electronic device 100, thecommunication subsystem 104 is configured in accordance with the GlobalSystem for Mobile Communication (GSM) and General Packet Radio Services(GPRS) standards. The GSM/GPRS wireless network is used worldwide and itis expected that these standards will be superseded eventually byEnhanced Data GSM Environment (EDGE) and Universal MobileTelecommunications Service (UMTS). New standards are still beingdefined, but it is believed that they will have similarities to thenetwork behavior described herein, and it will also be understood bypersons skilled in the art that the embodiments described herein areintended to use any other suitable standards that are developed in thefuture. The wireless link connecting the communication subsystem 104with the wireless network 200 represents one or more different RadioFrequency (RF) channels, operating according to defined protocolsspecified for GSM/GPRS communications. With newer network protocols,these channels are capable of supporting both circuit switched voicecommunications and packet switched data communications.

Although the wireless network 200 associated with portable electronicdevice 100 is a GSM/GPRS wireless network in one exemplaryimplementation, other wireless networks may also be associated with theportable electronic device 100 in variant implementations. The differenttypes of wireless networks that may be employed include, for example,data-centric wireless networks, voice-centric wireless networks, anddual-mode networks that can support both voice and data communicationsover the same physical base stations. Combined dual-mode networksinclude, but are not limited to, Code Division Multiple Access (CDMA) orCDMA2000 networks, GSM/GPRS networks (as mentioned above), andthird-generation (3G) networks such as EDGE and UMTS. Some otherexamples of data-centric networks include WiFi 802.11, Mobitex™ andDataTAC™ network communication systems. Examples of other voice-centricdata networks include Personal Communication Systems (PCS) networks likeGSM and Time Division Multiple Access (TDMA) systems. The main processor102 also interacts with additional subsystems such as a Random AccessMemory (RAM) 106, a flash memory 108, a display 110, an auxiliaryinput/output (I/O) subsystem 112, a data port 114, a trackball 115, akeyboard 116, a speaker 118, a microphone 120, short-rangecommunications 122 and other device subsystems 124.

Some of the subsystems of the portable electronic device 100 performcommunication-related functions, whereas other subsystems may provide“resident” or on-device functions. By way of example, the display 110,the trackball 115 and the keyboard 116 may be used for bothcommunication-related functions, such as entering a text message fortransmission over the network 200, and device-resident functions such asa calculator or task list.

The portable electronic device 100 can send and receive communicationsignals over the wireless network 200 after network registration oractivation procedures have been completed. Network access is associatedwith a subscriber or user of the portable electronic device 100. Toidentify a subscriber, a SIM/RUIM card 126 (i.e. Subscriber IdentityModule or a Removable User Identity Module) is inserted into a SIM/RUIMinterface 128 in order to communicate with a network. The SIM/RUIM card126 is a type of a conventional “smart card” that can be used toidentify a subscriber of the portable electronic device 100 and topersonalize the portable electronic device 100, among other things. Inthe present embodiment, the portable electronic device 100 is not fullyoperational for communication with the wireless network 200 without theSIM/RUIM card 126. By inserting the SIM/RUIM card 126 into the SIM/RUIMinterface 128, a subscriber can access all subscribed services. Servicesmay include: web browsing and messaging such as e-mail, voice mail,Short Message Service (SMS), and Multimedia Messaging Services (MMS).More advanced services may include: point of sale, field service andsales force automation. The SIM/RUIM card 126 includes a processor andmemory for storing information. Once the SIM/RUIM card 126 is insertedinto the SIM/RUIM interface 128, it is coupled to the main processor102. In order to identify the subscriber, the SIM/RUIM card 126 caninclude some user parameters such as an International Mobile SubscriberIdentity (IMSI). An advantage of using the SIM/RUIM card 126 is that asubscriber is not necessarily bound by any single physical portableelectronic device. The SIM/RUIM card 126 may store additional subscriberinformation for a portable electronic device as well, including datebook(or calendar) information and recent call information. Alternatively,user identification information can also be programmed into the flashmemory 108.

The portable electronic device 100 is a battery-powered device andincludes a battery interface 132 for receiving one or more rechargeablebatteries 130. In at least some embodiments, the battery 130 can be asmart battery with an embedded microprocessor. The battery interface 132is coupled to a regulator (not shown), which assists the battery 130 inproviding power V+ to the portable electronic device 100. Althoughcurrent technology makes use of a battery, future technologies such asmicro fuel cells may provide the power to the portable electronic device100.

The portable electronic device 100 also includes an operating system 134and software components 136 to 146 which are described in more detailbelow. The operating system 134 and the software components 136 to 146that are executed by the main processor 102 are typically stored in apersistent store such as the flash memory 108, which may alternativelybe a read-only memory (ROM) or similar storage element (not shown).Those skilled in the art will appreciate that portions of the operatingsystem 134 and the software components 136 to 146, such as specificdevice applications, or parts thereof, may be temporarily loaded into avolatile store such as the RAM 106. Other software components can alsobe included, as is well known to those skilled in the art.

The subset of software applications 136 that control basic deviceoperations, including data and voice communication applications areinstalled on the portable electronic device 100 during its manufacture.Other software applications include a message application 138 that canbe any suitable software program that allows a user of the portableelectronic device 100 to send and receive electronic messages. Variousalternatives exist for the message application 138 as is well known tothose skilled in the art. Messages that have been sent or received bythe user are typically stored in the flash memory 108 of the portableelectronic device 100 or some other suitable storage element in theportable electronic device 100. In at least some embodiments, some ofthe sent and received messages may be stored remotely from the device100 such as in a data store of an associated host system that theportable electronic device 100 communicates with.

The software applications can further include a device state module 140,a Personal Information Manager (PIM) 142, and other suitable modules(not shown). The device state module 140 provides persistence, i.e. thedevice state module 140 ensures that important device data is stored inpersistent memory, such as the flash memory 108, so that the data is notlost when the portable electronic device 100 is turned off or losespower.

The PIM 142 includes functionality for organizing and managing dataitems of interest to the user, such as, but not limited to, e-mail,contacts, calendar events, voice mails, appointments, and task items.PIM applications include, for example, calendar, address book, tasks andmemo applications. The PIM applications have the ability to send andreceive data items via the wireless network 200. PIM data items may beseamlessly integrated, synchronized, and updated via the wirelessnetwork 200 with the portable electronic device subscriber'scorresponding data items stored and/or associated with a host computersystem. This functionality creates a mirrored host computer on theportable electronic device 100 with respect to such items. This can beparticularly advantageous when the host computer system is the portableelectronic device subscriber's office computer system.

The portable electronic device 100 also includes a connect module 144,and an information technology (IT) policy module 146. The connect module144 implements the communication protocols that are required for theportable electronic device 100 to communicate with the wirelessinfrastructure and any host system, such as an enterprise system, thatthe portable electronic device 100 is authorized to interface with.Examples of a wireless infrastructure and an enterprise system are givenin FIGS. 3 and 4, which are described in more detail below.

The connect module 144 includes a set of APIs that can be integratedwith the portable electronic device 100 to allow the portable electronicdevice 100 to use any number of services associated with the enterprisesystem. The connect module 144 allows the portable electronic device 100to establish an end-to-end secure, authenticated communication pipe withthe host system. A subset of applications for which access is providedby the connect module 144 can be used to pass IT policy commands fromthe host system to the portable electronic device 100. This can be donein a wireless or wired manner. These instructions can then be passed tothe IT policy module 146 to modify the configuration of the device 100.Alternatively, in some cases, the IT policy update can also be done overa wired connection.

Other types of software applications can also be provided on theportable electronic device 100 and still others can be installed on theportable electronic device 100. Such software applications can be thirdparty applications, which are added after the manufacture of theportable electronic device 100. Examples of third party applicationsinclude games, calculators, utilities, etc.

The additional applications can be loaded onto the portable electronicdevice 100 through at least one of the wireless network 200, theauxiliary I/O subsystem 112, the data port 114, the short-rangecommunications subsystem 122, or any other suitable device subsystem124. This flexibility in application installation increases thefunctionality of the portable electronic device 100 and may provideenhanced on-device functions, communication-related functions, or both.For example, secure communication applications may enable electroniccommerce functions and other such financial transactions to be performedusing the portable electronic device 100.

The data port 114 enables a subscriber to set preferences through anexternal device or software application and extends the capabilities ofthe portable electronic device 100 by providing for information orsoftware downloads to the portable electronic device 100 other thanthrough a wireless communication network. The alternate download pathmay, for example, be used to load an encryption key onto the portableelectronic device 100 through a direct and thus reliable and trustedconnection to provide secure device communication.

The data port 114 can be any suitable port that enables datacommunication between the portable electronic device 100 and anothercomputing device. The data port 114 can be a serial or a parallel port.In some instances, the data port 114 can be a USB port that includesdata lines for data transfer and a supply line that can provide acharging current to charge the battery 130 of the portable electronicdevice 100.

The short-range communications subsystem 122 provides for communicationbetween the portable electronic device 100 and different systems ordevices, without the use of the wireless network 200. For example, thesubsystem 122 may include an infrared device and associated circuits andcomponents for short-range communication. Examples of short-rangecommunication standards include standards developed by the Infrared DataAssociation (IrDA), Bluetooth, and the 802.11 family of standardsdeveloped by IEEE.

In use, a received signal such as a text message, an e-mail message, Webpage download, or any other information is processed by thecommunication subsystem 104 and input to the main processor 102. Themain processor 102, in conjunction with a rendering engine 105, whichcan be provided in hardware, software or a combination thereof, willthen process the received signal for output to the display 110 oralternatively to the auxiliary I/O subsystem 112. A subscriber may alsocompose data items, such as e-mail messages, for example, using thekeyboard 116 in conjunction with the display 110 and possibly theauxiliary I/O subsystem 112. The auxiliary subsystem 112 may includedevices such as: a touch screen, mouse, track ball, infrared fingerprintdetector, or a roller wheel with dynamic button pressing capability. Thekeyboard 116 is preferably an alphanumeric keyboard and/ortelephone-type keypad. However, other types of keyboards may also beused. A composed item may be transmitted over the wireless network 200through the communication subsystem 104.

For voice communications, the overall operation of the portableelectronic device 100 is substantially similar, except that the receivedsignals are output to the speaker 118, and signals for transmission aregenerated by the microphone 120. Alternative voice or audio I/Osubsystems, such as a voice message recording subsystem, can also beimplemented on the portable electronic device 100. Although voice oraudio signal output is accomplished primarily through the speaker 118,the display 110 can also be used to provide additional information suchas the identity of a calling party, duration of a voice call, or othervoice call related information.

Referring now to FIG. 2, an exemplary block diagram of the communicationsubsystem component 104 is shown. The communication subsystem 104includes a receiver 150, a transmitter 152, as well as associatedcomponents such as one or more embedded or internal antenna elements 154and 156, Local Oscillators (LOs) 158, and a processing module such as aDigital Signal Processor (DSP) 160. The particular design of thecommunication subsystem 104 is dependent upon the communication network200 with which the portable electronic device 100 is intended tooperate. Thus, it should be understood that the design illustrated inFIG. 2 serves only as one example.

Signals received by the antenna 154 through the wireless network 200 areinput to the receiver 150, which may perform such common receiverfunctions as signal amplification, frequency down conversion, filtering,channel selection, and analog-to-digital (A/D) conversion. ND conversionof a received signal allows more complex communication functions such asdemodulation and decoding to be performed in the DSP 160. In a similarmanner, signals to be transmitted are processed, including modulationand encoding, by the DSP 160. These DSP-processed signals are input tothe transmitter 152 for digital-to-analog (D/A) conversion, frequency upconversion, filtering, amplification and transmission over the wirelessnetwork 200 via the antenna 156. The DSP 160 not only processescommunication signals, but also provides for receiver and transmittercontrol. For example, the gains applied to communication signals in thereceiver 150 and the transmitter 152 may be adaptively controlledthrough automatic gain control algorithms implemented in the DSP 160.

The wireless link between the portable electronic device 100 and thewireless network 200 can contain one or more different channels,typically different RF channels, and associated protocols used betweenthe portable electronic device 100 and the wireless network 200. An RFchannel is a limited resource that should be conserved, typically due tolimits in overall bandwidth and limited battery power of the portableelectronic device 100.

When the portable electronic device 100 is fully operational, thetransmitter 152 is typically keyed or turned on only when it istransmitting to the wireless network 200 and is otherwise turned off toconserve resources. Similarly, the receiver 150 is periodically turnedoff to conserve power until it is needed to receive signals orinformation (if at all) during designated time periods.

Referring now to FIG. 3, a block diagram of an exemplary implementationof a node 202 of the wireless network 200 is shown. In practice, thewireless network 200 comprises one or more nodes 202. In conjunctionwith the connect module 144, the portable electronic device 100 cancommunicate with the node 202 within the wireless network 200. In theexemplary implementation of FIG. 3, the node 202 is configured inaccordance with General Packet Radio Service (GPRS) and Global Systemsfor Mobile (GSM) technologies. The node 202 includes a base stationcontroller (BSC) 204 with an associated tower station 206, a PacketControl Unit (PCU) 208 added for GPRS support in GSM, a Mobile SwitchingCenter (MSC) 210, a Home Location Register (HLR) 212, a Visitor LocationRegistry (VLR) 214, a Serving GPRS Support Node (SGSN) 216, a GatewayGPRS Support Node (GGSN) 218, and a Dynamic Host Configuration Protocol(DHCP) 220. This list of components is not meant to be an exhaustivelist of the components of every node 202 within a GSM/GPRS network, butrather a list of components that are commonly used in communicationsthrough the network 200.

In a GSM network, the MSC 210 is coupled to the BSC 204 and to alandline network, such as a Public Switched Telephone Network (PSTN) 222to satisfy circuit switched requirements. The connection through the PCU208, the SGSN 216 and the GGSN 218 to a public or private network(Internet) 224 (also referred to herein generally as a shared networkinfrastructure) represents the data path for GPRS capable portableelectronic devices. In a GSM network extended with GPRS capabilities,the BSC 204 also contains the Packet Control Unit (PCU) 208 thatconnects to the SGSN 216 to control segmentation, radio channelallocation and to satisfy packet switched requirements. To track thelocation of the portable electronic device 100 and availability for bothcircuit switched and packet switched management, the HLR 212 is sharedbetween the MSC 210 and the SGSN 216. Access to the VLR 214 iscontrolled by the MSC 210.

The station 206 is a fixed transceiver station and together with the BSC204 form fixed transceiver equipment. The fixed transceiver equipmentprovides wireless network coverage for a particular coverage areacommonly referred to as a “cell”. The fixed transceiver equipmenttransmits communication signals to and receives communication signalsfrom portable electronic devices within its cell via the station 206.The fixed transceiver equipment normally performs such functions asmodulation and possibly encoding and/or encryption of signals to betransmitted to the portable electronic device 100 in accordance withparticular, usually predetermined, communication protocols andparameters, under control of its controller. The fixed transceiverequipment similarly demodulates and possibly decodes and decrypts, ifnecessary, any communication signals received from the portableelectronic device 100 within its cell. Communication protocols andparameters may vary between different nodes. For example, one node mayemploy a different modulation scheme and operate at differentfrequencies than other nodes.

For all portable electronic devices 100 registered with a specificnetwork, permanent configuration data such as a user profile is storedin the HLR 212. The HLR 212 also contains location information for eachregistered portable electronic device and can be queried to determinethe current location of a portable electronic device. The MSC 210 isresponsible for a group of location areas and stores the data of theportable electronic devices currently in its area of responsibility inthe VLR 214. Further, the VLR 214 also contains information on portableelectronic devices that are visiting other networks. The information inthe VLR 214 includes part of the permanent portable electronic devicedata transmitted from the HLR 212 to the VLR 214 for faster access. Bymoving additional information from a remote HLR 212 node to the VLR 214,the amount of traffic between these nodes can be reduced so that voiceand data services can be provided with faster response times and at thesame time requiring less use of computing resources.

The SGSN 216 and the GGSN 218 are elements added for GPRS support;namely packet switched data support, within GSM. The SGSN 216 and theMSC 210 have similar responsibilities within the wireless network 200 bykeeping track of the location of each portable electronic device 100.The SGSN 216 also performs security functions and access control fordata traffic on the wireless network 200. The GGSN 218 providesinternetworking connections with external packet switched networks andconnects to one or more SGSN's 216 via an Internet Protocol (IP)backbone network operated within the network 200. During normaloperations, a given portable electronic device 100 must perform a “GPRSAttach” to acquire an IP address and to access data services. Thisrequirement is not present in circuit switched voice channels asIntegrated Services Digital Network (ISDN) addresses are used forrouting incoming and outgoing calls. Currently, all GPRS capablenetworks use private, dynamically assigned IP addresses, thus requiringthe DHCP server 220 connected to the GGSN 218. There are many mechanismsfor dynamic IP assignment, including using a combination of a RemoteAuthentication Dial-In User Service (RADIUS) server and a DHCP server.Once the GPRS Attach is complete, a logical connection is establishedfrom a portable electronic device 100, through the PCU 208, and the SGSN216 to an Access Point Node (APN) within the GGSN 218. The APNrepresents a logical end of an IP tunnel that can either access directInternet compatible services or private network connections. The APNalso represents a security mechanism for the network 200, insofar aseach portable electronic device 100 must be assigned to one or more APNsand portable electronic devices 100 cannot exchange data without firstperforming a GPRS Attach to an APN that it has been authorized to use.The APN may be considered to be similar to an Internet domain name suchas “myconnection.wireless.com”.

Once the GPRS Attach operation is complete, a tunnel is created and alltraffic is exchanged within standard IP packets using any protocol thatcan be supported in IP packets. This includes tunneling methods such asIP over IP as in the case with some IPSecurity (IPsec) connections usedwith Virtual Private Networks (VPN). These tunnels are also referred toas Packet Data Protocol (PDP) Contexts and there are a limited number ofthese available in the network 200. To maximize use of the PDP Contexts,the network 200 will run an idle timer for each PDP Context to determineif there is a lack of activity. When a portable electronic device 100 isnot using its PDP Context, the PDP Context can be de-allocated and theIP address returned to the IP address pool managed by the DHCP server220.

Referring now to FIG. 4, shown therein is a block diagram illustratingcomponents of an exemplary configuration of a host system 250 that theportable electronic device 100 can communicate with in conjunction withthe connect module 144. The host system 250 will typically be acorporate enterprise or other local area network (LAN), but may also bea home office computer or some other private system, for example, invariant implementations. In this example shown in FIG. 4, the hostsystem 250 is depicted as a LAN of an organization to which a user ofthe portable electronic device 100 belongs. Typically, a plurality ofportable electronic devices can communicate wirelessly with the hostsystem 250 through one or more nodes 202 of the wireless network 200.

The host system 250 comprises a number of network components connectedto each other by a network 260. For instance, a user's desktop computer262 a with an accompanying cradle 264 for the user's portable electronicdevice 100 is situated on a LAN connection. The cradle 264 for theportable electronic device 100 can be coupled to the computer 262 a by aserial or a Universal Serial Bus (USB) connection, for example. Otheruser computers 262 b-262 n are also situated on the network 260, andeach may or may not be equipped with an accompanying cradle 264. Thecradle 264 facilitates the loading of information (e.g. PIM data,private symmetric encryption keys to facilitate secure communications)from the user computer 262 a to the portable electronic device 100, andmay be particularly useful for bulk information updates often performedin initializing the portable electronic device 100 for use. Theinformation downloaded to the portable electronic device 100 may includecertificates used in the exchange of messages.

It will be understood by persons skilled in the art that the usercomputers 262 a-262 n will typically also be connected to otherperipheral devices, such as printers, etc. which are not explicitlyshown in FIG. 4. Furthermore, only a subset of network components of thehost system 250 are shown in FIG. 4 for ease of exposition, and it willbe understood by persons skilled in the art that the host system 250will comprise additional components that are not explicitly shown inFIG. 4 for this exemplary configuration. More generally, the host system250 may represent a smaller part of a larger network (not shown) of theorganization, and may comprise different components and/or be arrangedin different topologies than that shown in the exemplary embodiment ofFIG. 4.

To facilitate the operation of the portable electronic device 100 andthe wireless communication of messages and message-related data betweenthe portable electronic device 100 and components of the host system250, a number of wireless communication support components 270 can beprovided. In some implementations, the wireless communication supportcomponents 270 can include a management server 272, a mobile data server(MDS) 274, a web server, such as Hypertext Transfer Protocol (HTTP)server 275, a contact server 276, and a device manager module 278. HTTPservers can also be located outside the enterprise system, as indicatedby the HTTP server 275 attached to the network 224. The device managermodule 278 includes an IT Policy editor 280 and an IT user propertyeditor 282, as well as other software components for allowing an ITadministrator to configure the portable electronic devices 100. In analternative embodiment, there may be one editor that provides thefunctionality of both the IT policy editor 280 and the IT user propertyeditor 282. The support components 270 also include a data store 284,and an IT policy server 286. The IT policy server 286 includes aprocessor 288, a network interface 290 and a memory unit 292. Theprocessor 288 controls the operation of the IT policy server 286 andexecutes functions related to the standardized IT policy as describedbelow. The network interface 290 allows the IT policy server 286 tocommunicate with the various components of the host system 250 and theportable electronic devices 100. The memory unit 292 can store functionsused in implementing the IT policy as well as related data. Thoseskilled in the art know how to implement these various components. Othercomponents may also be included as is well known to those skilled in theart. Further, in some implementations, the data store 284 can be part ofany one of the servers.

In this exemplary embodiment, the portable electronic device 100communicates with the host system 250 through node 202 of the wirelessnetwork 200 and a shared network infrastructure 224 such as a serviceprovider network or the public Internet. Access to the host system 250may be provided through one or more routers (not shown), and computingdevices of the host system 250 may operate from behind a firewall orproxy server 266. The proxy server 266 provides a secure node and awireless internet gateway for the host system 250. The proxy server 266intelligently routes data to the correct destination server within thehost system 250.

In some implementations, the host system 250 can include a wireless VPNrouter (not shown) to facilitate data exchange between the host system250 and the portable electronic device 100. The wireless VPN routerallows a VPN connection to be established directly through a specificwireless network to the portable electronic device 100. The wireless VPNrouter can be used with the Internet Protocol (IP) Version 6 (IPV6) andIP-based wireless networks. This protocol can provide enough IPaddresses so that each portable electronic device has a dedicated IPaddress, making it possible to push information to a portable electronicdevice at any time. An advantage of using a wireless VPN router is thatit can be an off-the-shelf VPN component, and does not require aseparate wireless gateway and separate wireless infrastructure. A VPNconnection can preferably be a Transmission Control Protocol (TCP)/IP orUser Datagram Protocol (UDP)/IP connection for delivering the messagesdirectly to the portable electronic device 100 in this alternativeimplementation.

Messages intended for a user of the portable electronic device 100 areinitially received by a message server 268 of the host system 250. Suchmessages may originate from any number of sources. For instance, amessage may have been sent by a sender from the computer 262 b withinthe host system 250, from a different portable electronic device (notshown) connected to the wireless network 200 or a different wirelessnetwork, or from a different computing device, or other device capableof sending messages, via the shared network infrastructure 224, possiblythrough an application service provider (ASP) or Internet serviceprovider (ISP), for example.

The message server 268 typically acts as the primary interface for theexchange of messages, particularly e-mail messages, within theorganization and over the shared network infrastructure 224. Each userin the organization that has been set up to send and receive messages istypically associated with a user account managed by the message server268. Some exemplary implementations of the message server 268 include aMicrosoft Exchange™ server, a Lotus Domino™ server, a Novell Groupwise™server, or another suitable mail server installed in a corporateenvironment. In some implementations, the host system 250 may comprisemultiple message servers 268. The message server provides additionalfunctions including PIM functions such as calendaring, contacts andtasks and supports data storage.

When messages are received by the message server 268, they are typicallystored in a data store associated with the message server 268. In atleast some embodiments, the data store may be a separate hardware unit,such as data store 284, that the message server 268 communicates with.Messages can be subsequently retrieved and delivered to users byaccessing the message server 268. For instance, an e-mail clientapplication operating on a user's computer 262 a may request the e-mailmessages associated with that user's account stored on the data storeassociated with the message server 268. These messages are thenretrieved from the data store and stored locally on the computer 262 a.The data store associated with the message server 268 can store copiesof each message that is locally stored on the portable electronic device100. Alternatively, the data store associated with the message server268 can store all of the messages for the user of the portableelectronic device 100 and only a smaller number of messages can bestored on the portable electronic device 100 to conserve memory. Forinstance, the most recent messages (i.e. those received in the past twoto three months for example) can be stored on the portable electronicdevice 100.

When operating the portable electronic device 100, the user may wish tohave e-mail messages retrieved for delivery to the portable electronicdevice 100. The message application 138 operating on the portableelectronic device 100 may also request messages associated with theuser's account from the message server 268. The message application 138may be configured (either by the user or by an administrator, possiblyin accordance with an organization's IT policy) to make this request atthe direction of the user, at some pre-defined time interval, or uponthe occurrence of some pre-defined event. In some implementations, theportable electronic device 100 is assigned its own e-mail address, andmessages addressed specifically to the portable electronic device 100are automatically redirected to the portable electronic device 100 asthey are received by the message server 268.

The management server 272 can be used to specifically provide supportfor the management of, for example, messages, such as e-mail messages,that are to be handled by portable electronic devices. Generally, whilemessages are still stored on the message server 268, the managementserver 272 can be used to control when, if, and how messages are sent tothe portable electronic device 100. The management server 272 alsofacilitates the handling of messages composed on the portable electronicdevice 100, which are sent to the message server 268 for subsequentdelivery.

For example, the management server 272 may monitor the user's “mailbox”(e.g. the message store associated with the user's account on themessage server 268) for new e-mail messages, and apply user-definablefilters to new messages to determine if and how the messages are relayedto the user's portable electronic device 100. The management server 272may also, through an encoder 273, compress messages, using any suitablecompression technology (e.g. YK compression, and other known techniques)and encrypt messages (e.g. using an encryption technique such as DataEncryption Standard (DES), Triple DES, or Advanced Encryption Standard(AES)), and push them to the portable electronic device 100 via theshared network infrastructure 224 and the wireless network 200. Themanagement server 272 may also receive messages composed on the portableelectronic device 100 (e.g. encrypted using Triple DES), decrypt anddecompress the composed messages, re-format the composed messages ifdesired so that they will appear to have originated from the user'scomputer 262 a, and re-route the composed messages to the message server268 for delivery.

Certain properties or restrictions associated with messages that are tobe sent from and/or received by the portable electronic device 100 canbe defined (e.g. by an administrator in accordance with IT policy) andenforced by the management server 272. These may include whether theportable electronic device 100 may receive encrypted and/or signedmessages, minimum encryption key sizes, whether outgoing messages mustbe encrypted and/or signed, and whether copies of all secure messagessent from the portable electronic device 100 are to be sent to apre-defined copy address, for example.

The management server 272 may also be adapted to provide other controlfunctions, such as only pushing certain message information orpre-defined portions (e.g. “blocks”) of a message stored on the messageserver 268 to the portable electronic device 100. For example, in somecases, when a message is initially retrieved by the portable electronicdevice 100 from the message server 268, the management server 272 maypush only the first part of a message to the portable electronic device100, with the part being of a pre-defined size (e.g. 2 KB). The user canthen request that more of the message be delivered in similar-sizedblocks by the management server 272 to the portable electronic device100, possibly up to a maximum pre-defined message size. Accordingly, themanagement server 272 facilitates better control over the type of dataand the amount of data that is communicated to the portable electronicdevice 100, and can help to minimize potential waste of bandwidth orother resources.

The MDS 274 encompasses any other server that stores information that isrelevant to the corporation. The mobile data server 274 may include, butis not limited to, databases, online data document repositories,customer relationship management (CRM) systems, or enterprise resourceplanning (ERP) applications. The MDS 274 can also connect to theInternet or other public network, through HTTP server 275 or othersuitable web server such as an File Transfer Protocol (FTP) server, toretrieve HTTP webpages and other data. Requests for webpages aretypically routed through MDS 274 and then to HTTP server 275, throughsuitable firewalls and other protective mechanisms. The web server thenretrieves the webpage over the Internet, and returns it to MDS 274. Asdescribed above in relation to management server 272, MDS 274 istypically provided, or associated, with an encoder 277 that permitsretrieved data, such as retrieved webpages, to be compressed, using anysuitable compression technology (e.g. YK compression, and other knowntechniques), and encrypted (e.g. using an encryption technique such asDES, Triple DES, or AES), and then pushed to the portable electronicdevice 100 via the shared network infrastructure 224 and the wirelessnetwork 200.

The contact server 276 can provide information for a list of contactsfor the user in a similar fashion as the address book on the portableelectronic device 100. Accordingly, for a given contact, the contactserver 276 can include the name, phone number, work address and e-mailaddress of the contact, among other information. The contact server 276can also provide a global address list that contains the contactinformation for all of the contacts associated with the host system 250.

It will be understood by persons skilled in the art that the managementserver 272, the MDS 274, the HTTP server 275, the contact server 276,the device manager module 278, the data store 284 and the IT policyserver 286 do not need to be implemented on separate physical serverswithin the host system 250. For example, some or all of the functionsassociated with the management server 272 may be integrated with themessage server 268, or some other server in the host system 250.Alternatively, the host system 250 may comprise multiple managementservers 272, particularly in variant implementations where a largenumber of portable electronic devices need to be supported.

The device manager module 278 provides an IT administrator with agraphical user interface with which the IT administrator interacts toconfigure various settings for the portable electronic devices 100. Asmentioned, the IT administrator can use IT policy rules to definebehaviors of certain applications on the portable electronic device 100that are permitted such as phone, web browser or Instant Messenger use.The IT policy rules can also be used to set specific values forconfiguration settings that an organization requires on the portableelectronic devices 100 such as auto signature text, WLAN/VoIP/VPNconfiguration, security requirements (e.g. encryption algorithms,password rules, etc.), specifying themes or applications that areallowed to run on the portable electronic device 100, and the like.

As indicated above, the portable electronic device 100 includes thePersonal Information Manager (PIM) 142 that includes functionality fororganizing and managing data items of interest to the user, such as, butnot limited to, e-mail, contacts, calendar events, voice mails,appointments, and task items. PIM applications include, for example,calendar, address book, tasks and memo applications.

The graphics in an application such as a map application are representedas polygons and line segments. These are rendered onto the screen withdifferent colors and stroking schemes to display a geographic location.In such applications, a user generally pans (horizontal and/or verticaltranslational movement) through a vast 2-dimensional (2D) spacecontaining the polygons and line segments or portions thereof. As theunderlying line segments, manifested as streets, roads and highways in amap application do not change with the user pan, the present methodfocuses on rendering only the newly exposed, or “clipped”, portions.

FIG. 5 is a flowchart of the present method. Generally, the presentmethod provides a method of static graphics rendering in a mobiledevice. As used herein, a “static” rendering application is defined as arendering application with no animation content in the rendered scene,such as map and other geographical display applications. In other words,the rendered scene is relatively static from one image frame to the nextframe, and there are no moving objects in the scene. Panning incrementsare received for panning a previously rendered frame to a panned frame(step 400). As used herein, “panning” refers to the action of scanningacross an image on a display of the mobile device 100. Panning across animage results in translation of the image in the horizontal and/orvertical directions, and may result in the display of previously hiddenportions of the image. “Panning increments” refer to the incrementalchanges in the horizontal and/or vertical coordinates of the imageresulting from the panning operation.

A rendering region is then defined based on the panning increments (step402). The “rendering region” is a generally L-shaped region in the 2Dplane, also referred to herein as the L-region, that includes only theportion of the image that was previously unrendered. The L-shaped regionhas inner horizontal and vertical boundaries that are collinear withrespective horizontal and vertical boundaries of the previously renderedframe and outer boundaries collinear with respective horizontal andvertical boundaries of the panned frame. A candidate line segment orpolyline is then clipped against the L-shaped rendering region to createclipped line segments contained within the rendering region (step 404).As used herein, a “polyline” is a series of connected line or arcsegments. The clipped line segments can then be rendered (step 406), anda portion of the previously rendered frame can be copied (step 408), toprovide the panned frame. The method can be performed by the renderingengine 105, shown in FIG. 1. Rendering speeds can be improved by up to 6to 8 times when compared to systems not using this technique.

Embodiments of the present method can be represented as a softwareproduct stored in a machine-readable medium (also referred to as acomputer-readable medium, a processor-readable medium, or a computerusable medium having a computer-readable program code embodied therein).The machine-readable medium can be any suitable tangible medium,including magnetic, optical, or electrical storage medium including adiskette, compact disk read only memory (CD-ROM), memory device(volatile or non-volatile), or similar storage mechanism. Themachine-readable medium can contain various sets of instructions, codesequences, configuration information, or other data, which, whenexecuted, cause a processor to perform steps in a method according to anembodiment of the invention. Those of ordinary skill in the art willappreciate that other instructions and operations necessary to implementthe described invention can also be stored on the machine-readablemedium. Software running from the machine-readable medium can interfacewith circuitry to perform the described tasks.

Embodiments of the present method will now be described with referenceto FIGS. 6-10. FIG. 6 shows a candidate polyline 440 over which a usercan pan a frame. The panning operation results in a previously renderedframe 450 being shifted to a desired new view, as indicated by thepanned frame 452. The panning operation can consist of a vertical pan,followed optionally by a horizontal pan, or vice versa, or can consistof simultaneous movement in both horizontal and vertical directions. Aresultant rendering region, shown as shaded L-region 454, is defined bythe panning operation.

The L-region 454 is by definition two rectangles, as shown, that combineto give the shape of an “L” on the screen. Each rectangle 456, 458represents a refresh region of the screen display, and is defined by thehorizontal and vertical panning increments, indicated by the arrows 460and 462.

Once the user performs the panning operation, the horizontal andvertical panning increments are captured or received, and are used tocompute the L-region 454, which represents the effective refresh regionon the screen. To clip the polyline 440 in accordance with the L-region454, a conventional line clipping method, such as the Cohen-Sutherlandmethod, is applied to the polyline 440 of FIG. 6. This step isillustrated in FIG. 7, where the boundaries of the panned frame 452define the rectangular clipping window used in the line clippingoperation. It should also be noted that the bounds of the rectangularclipping window conform to the outer edges of the L-region 454. Theclipped line segments resulting from the clipping operation is shown bythe clipped line segments 464, 466, 468.

Once the polyline 440 is clipped to the rectangular region 452, theresulting clipped line segments 464, 466, 468 are in turn each clippedagainst the L-region 454 to compute a set of L-region clipped linesegments 470, 472, 474, as shown in FIG. 8. The L-region clipped linesegments 470, 472, 474 represent the minimum number of screen pixelsrequiring a refresh to view the polyline 440 in the panned frame 452. Aswill be appreciated, once the set of L-region clipped line segments 470,472, 474 has been rendered, the remainder of screen bitmap can bederived or copied from the previously rendered frame 450, and can beused to fill in the region of the panned frame that is outside theL-region 454. This in effect reduces the total rendering needs of therefresh operation to just the L-region 454.

One embodiment for clipping the line segments 464, 466, 468 against theL-region 454 will now be described with reference to FIGS. 9 and 10. Forclipping line segments 464, 466, 468 to the L-region 454, the 2D planeis first divided into four quadrants, and codes are assigned to eachquadrant. A code is then computed for each end point of the candidateline segments 464, 466, 468. The computed codes permit each line segment464, 466, 468 to be categorized as line segments intersecting with theL-region boundaries; completely within the L-region boundaries; orcompletely outside the L-region boundaries. Line segments fallingcompletely within or completely outside the L-region can then betrivially accepted or rejected, respectively, for rendering.

To divide the 2D plane into quadrants or regions, the vertical andhorizontal interior line segments 480 and 490 forming the L-region areextended, and codes (00), (01), (11) and (10) are assigned to therespective regions. The first digit in the code represents the verticalcomponent V, and the second digit represents the horizontal component H.The codes are assigned to the regions such that those regions fallingwithin the L-region 454 with respect to the vertical line 480 areassigned a vertical component of “0”, and those falling outside theL-region 454 with respect to the vertical line 480 are assigned avertical component of “1”. Similarly, horizontal components of theregion codes are assigned such that those regions falling within theL-region 454 with respect to the horizontal line 490 are assigned ahorizontal component of “0”, and those falling outside the L-region 454with respect to the horizontal line 490 are assigned a horizontalcomponent of “1”.

Codes are then computed for each endpoint of the candidate line segments464, 466, 468. In the illustrated example shown in FIG. 9, the codescomputed for the endpoints of line segment 464, 466, and 468 are[P1(01), P2(10)]; [P1(01), P2(11)] and [P1(10), P2(11)], respectively.Once the VH codes are assigned to all the end points of the candidateline segments, each line segment is examined to first determine if itcan be trivially accepted or rejected.

As shown in FIG. 11, there are eight distinct cases for classifying aline segment. Each of these eight cases is shown by its respectivelynumbered line segment in FIG. 11:

-   -   Class 1: P1 (11) and P2 (11). This implies that both the points        are outside the LRegion.    -   Class 2: P1 (01) and P2 (10). This implies that P1 lies outside        the horizontal region but inside the vertical region and vice        versa for P2. This case has two subcases—        -   a. The line segment lies completely within the L-region.        -   b. The line segment P1P2 intersects the L-region boundaries.    -   Class 3: P1 (00) and P2 (10). This implies that P1 is inside        both the vertical and horizontal regions and P2 inside the        horizontal region, which in turn means that the line segment is        completely within the L-region.    -   Class 4: P1 (00) and P2 (00). This implies that both P1 and P2        are inside both the vertical and horizontal regions hence the        line segment is also completely within the L-region.    -   Class 5: P1 (01) and P2 (00). This case is similar to case 3.        The line segment is contained completely within the L-region by        virtue of the containment of P1 and P2 inside the vertical        region.    -   Class 6: P1 (01) and P2 (11). This case implies that P1 is        contained inside the vertical region and P2 outside the L-region        and hence the line segment P1P2 intersects the L-region at the        vertical boundary.    -   Class 7: P1 (10) and P2 (11). This case implies that P1 is        contained inside the horizontal region and P2 outside the        L-region and hence the line segment P1P2 intersects the L-region        at the horizontal boundary.    -   Class 8: P1 (00) and P2 (11). This case implies that P1 is        contained inside the horizontal as well as the vertical region        and P2 outside both and hence the line segment P1P2 intersects        the L-region at either the horizontal or the vertical boundary.        This case can also be considered a sub-class of classes 7 and 8.

A line segment classified as belonging Class 1 can be triviallyrejected, and line segments classified as belonging to Classes 3, 4 or 5can be trivially accepted for rendering. Line segments classified in theremaining classes require further processing to determine the portionrequired to be rendered or refreshed.

As can be seen from the illustrated example, line segments 464, 466, 468are classified in Classes 2, 6 and 7, respectively. Hence, furtherclipping operations are performed on the each of the line segments, asshown in FIG. 10. The line segments 464, 466, 468 are first clipped withrespect to the vertical line 480 of the L-region. A line segment is saidto be clipped with respect to a line when it is split with respect tothe line, and the newly created line segments on one side of the lineare retained or accepted. Those portions of the line segments 464, 466,468 that lie on the side of the line 480 within the L-region 454 (i.e.clipped line segments 492 and 494) can be retained or accepted forrendering, and can be rendered immediately without further clipping.Those portions which lie to the other side of the line 490 are furtherprocessed by performing another clipping operation with respect to theinterior horizontal line 490 of the L-region 454, discarding those newlyclipped line segments that fall outside the L-region 454 and retainingor accepting those that fall within the L-region. In the illustratedexample, this results in further accepting newly clipped line segments496 and 498.

The present method permits line segments and polylines to be clipped invery short time when compared to other line clipping methods. The numberof final line segments to render is contained within only a fraction ofthe total geometry that spans the entire display, since the L-region istypically only 10-25% of the total screen area. As the number of linesegments grows, the present method can greatly accelerate rendering byrestricting the number of pixels needed to be redrawn in any panningoperation.

While the embodiments described herein are directed to particularimplementations of the electronic device and method of controlling theelectronic device, the above-described embodiments are intended to beexamples. It will be understood that alterations, modifications andvariations may be effected without departing from the scope of thepresent disclosure.

What is claimed is:
 1. An electronic device, comprising: a display; anda processor, the processor configured to: determine a refresh region anda copy region of a panned frame based on panning increments between thepanned frame and a previously rendered frame; clip a candidate segmentagainst the refresh region to obtain one or more clipped segments withinthe refresh region; and render the panned frame on the display byrendering the one or more clipped segments in the refresh region of thepanned frame and copying a portion of the previously rendered frame tothe copy region of the panned frame.
 2. The electronic device of claim1, wherein the panning increments comprise horizontal and verticalpanning increments.
 3. The electronic device of claim 2, wherein therefresh region is L-shaped.
 4. The electronic device according to claim3, wherein determining the L-shaped refresh region comprises determiningan L-shaped region having inner horizontal and vertical boundariescollinear with respective horizontal and vertical boundaries of thepreviously rendered frame and outer boundaries collinear with respectivehorizontal and vertical boundaries of the panned frame.
 5. Theelectronic device according to claim 4, wherein clipping the candidatesegment comprises: performing a clipping operation on the candidatesegment, based on a rectangle determined by the horizontal and verticalboundaries of the panned frame to obtain one or more intermediatesegments; and clipping the one or more intermediate segments against theL-shaped refresh region to determine the one or more clipped segments.6. The electronic device according to claim 5, wherein clipping the oneor more intermediate segments comprises: dividing a 2-dimensional planecontaining the candidate segment into four regions with respect to thehorizontal and vertical inner boundaries of the L-shaped refresh region;determining, for each of the one or more intermediate segments, if saidintermediate segment is wholly included or wholly excluded, based uponthe respective regions in which the endpoints of said intermediatesegment are located; and clipping those intermediate segments, that arenot wholly included or wholly excluded, with respect to at least one ofthe horizontal and vertical inner boundaries of the L-shaped refreshregion.
 7. The electronic device according to claim 6, whereindetermining, for each of the one or more intermediate segments, if saidintermediate segment is wholly included or wholly excluded comprises:assigning unique codes to each of the four regions; assigning one of theunique codes to each end point of the intermediate segments, based onthe region in which the respective end point is located; and determiningif said intermediate segment is wholly included or wholly excluded basedon the unique codes assigned to each respective endpoint.
 8. Theelectronic device according to claim 7, wherein assigning unique codesto each of the four regions comprises assigning a respective one ofcodes (00), (01), (11) and (10) to each of the four regions.
 9. Acomputer-implemented method, comprising: determining a refresh regionand a copy region of a panned frame based on panning increments betweenthe panned frame and a previously rendered frame; clipping a candidatesegment against the refresh region to obtain one or more clippedsegments within the refresh region; and rendering the panned frame byrendering the one or more clipped segments in the refresh region of thepanned frame and copying a portion of the previously rendered frame tothe copy region of the panned frame.
 10. The method of claim 9, whereinthe panning increments comprise horizontal and vertical panningincrements.
 11. The method of claim 10, wherein the refresh region isL-shaped.
 12. The method according to claim 11, wherein determining theL-shaped refresh region comprises determining an L-shaped region havinginner horizontal and vertical boundaries collinear with respectivehorizontal and vertical boundaries of the previously rendered frame andouter boundaries collinear with respective horizontal and verticalboundaries of the panned frame.
 13. The method according to claim 12,wherein clipping the candidate segment comprises: performing a clippingoperation on the candidate segment, based on a rectangle determined bythe horizontal and vertical boundaries of the panned frame to obtain oneor more intermediate segments; and clipping the one or more intermediatesegments against the L-shaped refresh region to determine the one ormore clipped segments.
 14. The method according to claim 13, whereinclipping the one or more intermediate segments comprises: dividing a2-dimensional plane containing the candidate segment into four regionswith respect to the horizontal and vertical inner boundaries of theL-shaped refresh region; determining, for each of the one or moreintermediate segments, if said intermediate segment is wholly includedor wholly excluded, based upon the respective regions in which theendpoints of said intermediate segment are located; and clipping thoseintermediate segments, that are not wholly included or wholly excluded,with respect to at least one of the horizontal and vertical innerboundaries of the L-shaped refresh region.
 15. The method according toclaim 14, wherein determining, for each of the one or more intermediatesegments, if said intermediate segment is wholly included or whollyexcluded comprises: assigning unique codes to each of the four regions;assigning one of the unique codes to each end point of the intermediatesegments, based on the region in which the respective end point islocated; and determining if said intermediate segment is wholly includedor wholly excluded based on the unique codes assigned to each respectiveendpoint.
 16. The method according to claim 15, wherein assigning uniquecodes to each of the four regions comprises assigning a respective oneof codes (00), (01), (11) and (10) to each of the four regions.
 17. Anon-transitory computer-readable medium having computer-readable codeembodied therein for execution by a processor at a computing device for:determining a refresh region and a copy region of a panned frame basedon panning increments between the panned frame and a previously renderedframe; clipping a candidate segment against the refresh region to obtainone or more clipped segments within the refresh region; and renderingthe panned frame by rendering the one or more clipped segments in therefresh region of the panned frame and copying a portion of thepreviously rendered frame to the copy region of the panned frame. 18.The computer-readable medium according to claim 17, wherein determiningthe refresh region comprises determining an L-shaped region having innerhorizontal and vertical boundaries collinear with respective horizontaland vertical boundaries of the previously rendered frame and outerboundaries collinear with respective horizontal and vertical boundariesof the panned frame.
 19. The computer-readable medium according to claim18, wherein clipping the candidate segment comprises: performing aclipping operation on the candidate segment, based on a rectangledetermined by the horizontal and vertical boundaries of the panned frameto obtain one or more intermediate segments; and clipping the one ormore intermediate segments against the L-shaped refresh region todetermine the one or more clipped segments.
 20. The computer-readablemedium according to claim 19, wherein clipping the one or moreintermediate segments comprises: dividing a 2-dimensional planecontaining the candidate segment into four regions with respect to thehorizontal and vertical inner boundaries of the L-shaped refresh region;determining, for each of the one or more intermediate segments, if saidintermediate segment is wholly included or wholly excluded, based uponthe respective regions in which the endpoints of said intermediatesegment are located; and clipping those intermediate segments, that arenot wholly included or wholly excluded, with respect to at least one ofthe horizontal and vertical inner boundaries of the L-shaped refreshregion.